package com.taozi.netty.socketio.use.classroomchat.mapper.education;


import com.github.pagehelper.Page;
import com.taozi.netty.socketio.use.classroomchat.entity.entity.education.Classroom;
import com.taozi.netty.socketio.use.classroomchat.entity.vo.education.ClassroomBean;
import com.taozi.netty.socketio.use.classroomchat.entity.vo.education.ClassroomVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 课堂信息
 *
 * @author mingtao
 */
@Repository
public interface ClassroomMapper {

    /**
     * @description 根据课堂id删除课堂 - 批量删除
     * @param idList
     * @return int
     * @author mingtao
     * @date 13:57 2019/6/20
     **/
    int deleteByPrimaryKey(List<Integer> idList);

    /**
     * @description 添加课堂
     * @param classroom
     * @return int
     * @author mingtao
     **/
    int insertSelective(Classroom classroom);

    /**
     * @description 根据课堂id查询课堂
     * @param id
     * @return Classroom
     * @author mingtao
     * @date 13:57 2019/6/20
     **/
    Classroom selectByPrimaryKey(Integer id);

    /**
    * @description 分页查询所有课堂
    * @param classroomVo
    * @return com.github.pagehelper.Page<ClassroomBean>
    * @author mingtao
    **/
    Page<ClassroomBean> pageFindList(ClassroomVo classroomVo);

    /**
     * @description 根据id和课堂密码查询课堂信息
     * @param classroomVo
     * @return Classroom
     * @author mingtao
     **/
    Classroom findByIdAndClassroomPwd(ClassroomVo classroomVo);

    /**
     * @description 根据课堂id更新课堂
     * @param classroom
     * @return int
     * @author mingtao
     **/
    int updateByPrimaryKeySelective(Classroom classroom);

}